<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Topics tagged with circles and rectangles]]></title><description><![CDATA[A list of topics that have been tagged with circles and rectangles]]></description><link>https://community.secnto.com//tags/circles and rectangles</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 00:56:32 GMT</lastBuildDate><atom:link href="https://community.secnto.com//tags/circles and rectangles.rss" rel="self" type="application/rss+xml"/><pubDate>Invalid Date</pubDate><ttl>60</ttl><item><title><![CDATA[CS602 Assignment 1 Solution and Discussion]]></title><description><![CDATA[@zaasmi said in CS602 Assignment 1 Solution and Discussion:

Question 1) Write a program in Dev C++ to draw a circle. Also, use the flood fill algorithm to fill the circle with different lines of red color.  The output of your program should like the below image:

Solution:
// C Implementation for setfillstyle 
// and floodfill function 
#include &lt;graphics.h&gt; 

// driver code 
int main() 
{ 
	// gm is Graphics mode which is 
	// a computer display mode that 
	// generates image using pixels. 
	// DETECT is a macro defined in 
	// "graphics.h" header file 
	int gd = DETECT, gm; 
	
	// initgraph initializes the 
	// graphics system by loading 
	// a graphics driver from disk 
	initgraph(&amp;gd, &amp;gm, " "); 

	// center and radius of circle 
	int x_circle = 250; 
	int y_circle = 250; 
	int radius=100; 
	
	// setting border color 
	int border_color = WHITE; 
	
	
	// set color and pattern 
	setfillstyle(HATCH_FILL,RED); 
	
	// x and y is a position and 
	// radius is for radius of circle 
	circle(x_circle,y_circle,radius); 
	
	// fill the color at location 
	// (x, y) with in border color 
	floodfill(x_circle,y_circle,border_color); 

	getch(); 
	
	// closegraph function closes the 
	// graphics mode and deallocates 
	// all memory allocated by 
	// graphics system 
	closegraph(); 
	
	return 0; 
}


]]></description><link>https://community.secnto.com//topic/2179/cs602-assignment-1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/2179/cs602-assignment-1-solution-and-discussion</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>